import Vue from 'vue'
import Router from 'vue-router'
import GoodsView from '@/views/GoodsView.vue'
import RatingsView from '@/views/RatingsView.vue'
import SellerView from '@/views/SellerView.vue'
import NoticeView from '../views/NoticeView.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/goods'
    },
    {
      path: '/goods',
      name: 'GoodsView',
      component: GoodsView,
      children: [
        {path: 'notice', component: NoticeView}
      ]
    },
    {
      path: '/ratings',
      name: 'RatingsView',
      component: RatingsView
    },
    {
      path: '/seller',
      name: 'Seller',
      component: SellerView
    },
    {
      path: '*',
      redirect: '/'
    }
  ],
  linkActiveClass: 'is-active'
})
